home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / comms / other / novia / bin / edit.c < prev    next >
C/C++ Source or Header  |  1999-12-06  |  686b  |  31 lines

  1. #include <pragma/noviasys_lib.h>
  2. #include <pragma/exec_lib.h>
  3. #include <stdio.h>
  4. #include <novia/novia_portdata.h>
  5.  
  6. struct Library *NoviaSysBase;
  7.  
  8. void ioprintf(const char *string, ...)
  9. {
  10.     char *buffer = AllocVec(10000,MEMF_ANY|MEMF_CLEAR);
  11.     if (buffer)
  12.     {
  13.         vsprintf(buffer, string, unsigned int(&string + 1));
  14.         Writeio(buffer,-1);
  15.         FreeVec(buffer);
  16.     }
  17. }
  18.  
  19. void main()
  20. {
  21.     if ((NoviaSysBase = OpenLibrary("noviasys.library", 0)))
  22.     {
  23.         struct PortData *cport = (struct PortData *)FindTask(NULL)->tc_UserData;
  24.         ItemEntryBlock *ieb;
  25.         if ((ieb = ndos_get_ieb(cport->argstring[1])))
  26.         {
  27.             ioprintf("edit: %d\n",ndos_editflags(cport->argstring[1]));
  28.         }
  29.         CloseLibrary(NoviaSysBase);
  30.     }
  31. }